﻿
				
Ext.onReady(function(){
	var panel = new Ext.Panel({
	//renderTo: 'panel',
	title:'panel',
	collapsible:true,
	//width:450,
	height:400
	//items:[grid] //管理grid
	}); 	 
					 
					 
	new Ext.Viewport({
		enableTabScroll:true,
		layout:"border",
		items:[{title:"面板",
			    region:"north",
			    height:50,
			    html:"<h1>网站后台管理系统!</h1>"
			    },
			    {title:"菜单",
				collapsible: true,
				margins:'5 0 5 5',
				cmargins:'5 5 5 5',
				split:true,
			    region:"west",
			    width:200,
			    collapsible:true, 
			    //html:"菜单栏",
				rootVisible:false,
				lines:false,
				autoScroll:true,
				items:[panel],
				collapseFirst:false,
		
				tbar: [{
					iconCls:'add-feed',
					text:'Add Feed',
					handler: this.showWindow,
					scope: this
				},{
					id:'delete',
					iconCls:'delete-icon',
					text:'Remove',
					handler: function(){
						var s = this.getSelectionModel().getSelectedNode();
						if(s){
							this.removeFeed(s.attributes.url);
						}
					},
					scope: this
				}]
				
			    },
				
			    {
			    xtype:"tabpanel",			   
			    region:"center",
			    items:[{title:"面板1"},
			    	   {title:"面板2"}],		   
			    
				tbar: [
					{
					id:'tab',
					text: 'View in New Tab',
					iconCls: 'new-tab',
					disabled:true,
					handler : this.openTab,
					scope: this
					},
					'-',
					{
					id:'win',
					text: 'Go to Post',
					iconCls: 'new-win',
					disabled:true,
					scope: this
					}
				]
				
				}
			    ]		
		});
});
